<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统测试 - 电子名片生成器</title>
    <link rel="stylesheet" href="/static/css/navbar.css">
    <style>
        /* 导航栏样式 */
        .navbar {
            background-color: #343a40;
            padding: 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
        }
        .nav-logo {
            color: white;
            font-size: 20px;
            font-weight: bold;
            text-decoration: none;
            padding: 15px 0;
        }
        .nav-logo:hover {
            color: white;
            text-decoration: none;
        }
        .nav-menu {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
        }
        .nav-menu li {
            margin: 0;
        }
        .nav-menu a {
            color: #adb5bd;
            text-decoration: none;
            padding: 15px 20px;
            display: block;
            transition: color 0.3s, background-color 0.3s;
        }
        .nav-menu a:hover,
        .nav-menu a.active {
            color: white;
            background-color: #495057;
            text-decoration: none;
        }
        /* 页面样式 */
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 800px;
            margin: 20px auto;
            background-color: #fff;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        h1 {
            color: #333;
            border-bottom: 2px solid #007bff;
            padding-bottom: 10px;
            margin-bottom: 20px;
        }
        .status-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px;
        }
        .status-card {
            padding: 20px;
            border-radius: 6px;
            border-left: 4px solid #007bff;
            background-color: #f8f9fa;
        }
        .status-card h3 {
            margin-top: 0;
            color: #495057;
            font-size: 16px;
        }
        .status-card p {
            margin-bottom: 0;
            color: #333;
            font-size: 14px;
        }
        .success {
            border-left-color: #28a745;
        }
        .warning {
            border-left-color: #ffc107;
        }
        .error {
            border-left-color: #dc3545;
        }
        .info {
            border-left-color: #17a2b8;
        }
        .footer {
            text-align: center;
            color: #6c757d;
            font-size: 14px;
            margin-top: 40px;
            padding-top: 20px;
            border-top: 1px solid #dee2e6;
        }
        .button-container {
            text-align: center;
            margin-top: 30px;
        }
        .btn {
            display: inline-block;
            padding: 10px 20px;
            background-color: #007bff;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            transition: background-color 0.3s;
        }
        .btn:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <nav class="navbar">
        <div class="nav-container">
            <a href="/" class="nav-logo">电子名片生成器</a>
            <button class="nav-toggle" onclick="toggleMobileMenu()">☰</button>
            <ul class="nav-menu" id="navMenu">
                <li><a href="/">首页</a></li>
                <li><a href="/card/index">名片生成</a></li>
                <li><a href="/department/index">部门管理</a></li>
                <li><a href="/position/index">岗位管理</a></li>
                <li><a href="/test" class="active">系统测试</a></li>
            </ul>
        </div>
    </nav>
    <div class="container">
        <h1>系统测试 - 电子名片生成器</h1>
        
        <div class="status-grid">
            <div class="status-card success">
                <h3>数据库连接状态</h3>
                <p>{$dbStatus}</p>
            </div>
            
            <div class="status-card info">
                <h3>文件访问权限</h3>
                <p>{$fileAccessStatus}</p>
            </div>
            
            <div class="status-card info">
                <h3>字体文件状态</h3>
                <p>{$fontStatus}</p>
            </div>
            
            <div class="status-card info">
                <h3>Logo文件状态</h3>
                <p>{$logoStatus}</p>
            </div>
            
            <div class="status-card info">
                <h3>PHP版本</h3>
                <p>{$phpVersion}</p>
            </div>
            
            <div class="status-card info">
                <h3>GD库版本</h3>
                <p>{$gdVersion}</p>
            </div>
        </div>
        
        <div class="status-card info">
            <h3>服务器时间</h3>
            <p>{$serverTime}</p>
        </div>
        
        <div class="button-container">
            <a href="/card/index" class="btn">前往名片生成器</a>
        </div>
        
        <div class="footer">
            电子名片生成器系统 - ThinkPHP 8.0
        </div>
    </div>
    
    <script>
        // 移动端导航菜单切换
        function toggleMobileMenu() {
            const navMenu = document.getElementById('navMenu');
            navMenu.classList.toggle('active');
        }
        
        // 点击其他地方关闭菜单
        document.addEventListener('click', function(event) {
            const navMenu = document.getElementById('navMenu');
            const navbar = document.querySelector('.navbar');
            
            if (!navbar.contains(event.target)) {
                navMenu.classList.remove('active');
            }
        });
    </script>
</body>
</html>